package com.jmp.autocofiguration;

import com.jmp.autocofiguration.util.OssUtil2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author cjr
 */
@Configuration
@EnableConfigurationProperties(OneOssProperties.class)
public class OneOssConfig {
    @Autowired
    private OneOssProperties oneOssProperties;

    @Bean
    public OssUtil2 ossUtil2() {
        OssUtil2 ossUtil2 = new OssUtil2();
        ossUtil2.init(oneOssProperties);
        return ossUtil2;
    }
}
